Optimal. Leaf size=141 \[ -\frac {3 x}{128 a}-\frac {\cos ^5(c+d x)}{5 a d}+\frac {\cos ^7(c+d x)}{7 a d}-\frac {3 \cos (c+d x) \sin (c+d x)}{128 a d}-\frac {\cos ^3(c+d x) \sin (c+d x)}{64 a d}+\frac {\cos ^5(c+d x) \sin (c+d x)}{16 a d}+\frac {\cos ^5(c+d x) \sin ^3(c+d x)}{8 a d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.15, antiderivative size = 141, normalized size of antiderivative = 1.00, number of steps
used = 9, number of rules used = 6, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.207, Rules used = {2918, 2645, 14,
2648, 2715, 8} \begin {gather*} \frac {\cos ^7(c+d x)}{7 a d}-\frac {\cos ^5(c+d x)}{5 a d}+\frac {\sin ^3(c+d x) \cos ^5(c+d x)}{8 a d}+\frac {\sin (c+d x) \cos ^5(c+d x)}{16 a d}-\frac {\sin (c+d x) \cos ^3(c+d x)}{64 a d}-\frac {3 \sin (c+d x) \cos (c+d x)}{128 a d}-\frac {3 x}{128 a} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 14
Rule 2645
Rule 2648
Rule 2715
Rule 2918
Rubi steps
\begin {align*} \int \frac {\cos ^6(c+d x) \sin ^3(c+d x)}{a+a \sin (c+d x)} \, dx &=\frac {\int \cos ^4(c+d x) \sin ^3(c+d x) \, dx}{a}-\frac {\int \cos ^4(c+d x) \sin ^4(c+d x) \, dx}{a}\\ &=\frac {\cos ^5(c+d x) \sin ^3(c+d x)}{8 a d}-\frac {3 \int \cos ^4(c+d x) \sin ^2(c+d x) \, dx}{8 a}-\frac {\text {Subst}\left (\int x^4 \left (1-x^2\right ) \, dx,x,\cos (c+d x)\right )}{a d}\\ &=\frac {\cos ^5(c+d x) \sin (c+d x)}{16 a d}+\frac {\cos ^5(c+d x) \sin ^3(c+d x)}{8 a d}-\frac {\int \cos ^4(c+d x) \, dx}{16 a}-\frac {\text {Subst}\left (\int \left (x^4-x^6\right ) \, dx,x,\cos (c+d x)\right )}{a d}\\ &=-\frac {\cos ^5(c+d x)}{5 a d}+\frac {\cos ^7(c+d x)}{7 a d}-\frac {\cos ^3(c+d x) \sin (c+d x)}{64 a d}+\frac {\cos ^5(c+d x) \sin (c+d x)}{16 a d}+\frac {\cos ^5(c+d x) \sin ^3(c+d x)}{8 a d}-\frac {3 \int \cos ^2(c+d x) \, dx}{64 a}\\ &=-\frac {\cos ^5(c+d x)}{5 a d}+\frac {\cos ^7(c+d x)}{7 a d}-\frac {3 \cos (c+d x) \sin (c+d x)}{128 a d}-\frac {\cos ^3(c+d x) \sin (c+d x)}{64 a d}+\frac {\cos ^5(c+d x) \sin (c+d x)}{16 a d}+\frac {\cos ^5(c+d x) \sin ^3(c+d x)}{8 a d}-\frac {3 \int 1 \, dx}{128 a}\\ &=-\frac {3 x}{128 a}-\frac {\cos ^5(c+d x)}{5 a d}+\frac {\cos ^7(c+d x)}{7 a d}-\frac {3 \cos (c+d x) \sin (c+d x)}{128 a d}-\frac {\cos ^3(c+d x) \sin (c+d x)}{64 a d}+\frac {\cos ^5(c+d x) \sin (c+d x)}{16 a d}+\frac {\cos ^5(c+d x) \sin ^3(c+d x)}{8 a d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(375\) vs. \(2(141)=282\).
time = 6.17, size = 375, normalized size = 2.66 \begin {gather*} \frac {1680 (c-d x) \cos \left (\frac {c}{2}\right )-1680 \cos \left (\frac {c}{2}+d x\right )-1680 \cos \left (\frac {3 c}{2}+d x\right )-560 \cos \left (\frac {5 c}{2}+3 d x\right )-560 \cos \left (\frac {7 c}{2}+3 d x\right )+280 \cos \left (\frac {7 c}{2}+4 d x\right )-280 \cos \left (\frac {9 c}{2}+4 d x\right )+112 \cos \left (\frac {9 c}{2}+5 d x\right )+112 \cos \left (\frac {11 c}{2}+5 d x\right )+80 \cos \left (\frac {13 c}{2}+7 d x\right )+80 \cos \left (\frac {15 c}{2}+7 d x\right )-35 \cos \left (\frac {15 c}{2}+8 d x\right )+35 \cos \left (\frac {17 c}{2}+8 d x\right )-3360 \sin \left (\frac {c}{2}\right )+1680 c \sin \left (\frac {c}{2}\right )-1680 d x \sin \left (\frac {c}{2}\right )+1680 \sin \left (\frac {c}{2}+d x\right )-1680 \sin \left (\frac {3 c}{2}+d x\right )+560 \sin \left (\frac {5 c}{2}+3 d x\right )-560 \sin \left (\frac {7 c}{2}+3 d x\right )+280 \sin \left (\frac {7 c}{2}+4 d x\right )+280 \sin \left (\frac {9 c}{2}+4 d x\right )-112 \sin \left (\frac {9 c}{2}+5 d x\right )+112 \sin \left (\frac {11 c}{2}+5 d x\right )-80 \sin \left (\frac {13 c}{2}+7 d x\right )+80 \sin \left (\frac {15 c}{2}+7 d x\right )-35 \sin \left (\frac {15 c}{2}+8 d x\right )-35 \sin \left (\frac {17 c}{2}+8 d x\right )}{71680 a d \left (\cos \left (\frac {c}{2}\right )+\sin \left (\frac {c}{2}\right )\right )} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.13, size = 207, normalized size = 1.47
method | result | size |
risch | \(-\frac {3 x}{128 a}-\frac {3 \cos \left (d x +c \right )}{64 a d}-\frac {\sin \left (8 d x +8 c \right )}{1024 a d}+\frac {\cos \left (7 d x +7 c \right )}{448 a d}+\frac {\cos \left (5 d x +5 c \right )}{320 a d}+\frac {\sin \left (4 d x +4 c \right )}{128 a d}-\frac {\cos \left (3 d x +3 c \right )}{64 a d}\) | \(107\) |
derivativedivides | \(\frac {\frac {16 \left (-\frac {1}{140}+\frac {3 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{1024}-\frac {2 \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{35}+\frac {23 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{1024}+\frac {\left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{20}-\frac {333 \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{1024}-\frac {2 \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{5}+\frac {671 \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{1024}-\frac {\left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4}-\frac {671 \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{1024}+\frac {333 \left (\tan ^{11}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{1024}-\frac {\left (\tan ^{12}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4}-\frac {23 \left (\tan ^{13}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{1024}-\frac {3 \left (\tan ^{15}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{1024}\right )}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{8}}-\frac {3 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{64}}{a d}\) | \(207\) |
default | \(\frac {\frac {16 \left (-\frac {1}{140}+\frac {3 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{1024}-\frac {2 \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{35}+\frac {23 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{1024}+\frac {\left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{20}-\frac {333 \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{1024}-\frac {2 \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{5}+\frac {671 \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{1024}-\frac {\left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4}-\frac {671 \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{1024}+\frac {333 \left (\tan ^{11}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{1024}-\frac {\left (\tan ^{12}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4}-\frac {23 \left (\tan ^{13}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{1024}-\frac {3 \left (\tan ^{15}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{1024}\right )}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{8}}-\frac {3 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{64}}{a d}\) | \(207\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 461 vs.
\(2 (127) = 254\).
time = 0.53, size = 461, normalized size = 3.27 \begin {gather*} \frac {\frac {\frac {105 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {2048 \, \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {805 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {1792 \, \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} - \frac {11655 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} - \frac {14336 \, \sin \left (d x + c\right )^{6}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{6}} + \frac {23485 \, \sin \left (d x + c\right )^{7}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{7}} - \frac {8960 \, \sin \left (d x + c\right )^{8}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{8}} - \frac {23485 \, \sin \left (d x + c\right )^{9}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{9}} + \frac {11655 \, \sin \left (d x + c\right )^{11}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{11}} - \frac {8960 \, \sin \left (d x + c\right )^{12}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{12}} - \frac {805 \, \sin \left (d x + c\right )^{13}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{13}} - \frac {105 \, \sin \left (d x + c\right )^{15}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{15}} - 256}{a + \frac {8 \, a \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {28 \, a \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} + \frac {56 \, a \sin \left (d x + c\right )^{6}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{6}} + \frac {70 \, a \sin \left (d x + c\right )^{8}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{8}} + \frac {56 \, a \sin \left (d x + c\right )^{10}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{10}} + \frac {28 \, a \sin \left (d x + c\right )^{12}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{12}} + \frac {8 \, a \sin \left (d x + c\right )^{14}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{14}} + \frac {a \sin \left (d x + c\right )^{16}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{16}}} - \frac {105 \, \arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a}}{2240 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.38, size = 80, normalized size = 0.57 \begin {gather*} \frac {640 \, \cos \left (d x + c\right )^{7} - 896 \, \cos \left (d x + c\right )^{5} - 105 \, d x - 35 \, {\left (16 \, \cos \left (d x + c\right )^{7} - 24 \, \cos \left (d x + c\right )^{5} + 2 \, \cos \left (d x + c\right )^{3} + 3 \, \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{4480 \, a d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 3580 vs.
\(2 (116) = 232\).
time = 71.02, size = 3580, normalized size = 25.39 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.45, size = 205, normalized size = 1.45 \begin {gather*} -\frac {\frac {105 \, {\left (d x + c\right )}}{a} + \frac {2 \, {\left (105 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{15} + 805 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{13} + 8960 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{12} - 11655 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{11} + 23485 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} + 8960 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{8} - 23485 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 14336 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} + 11655 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 1792 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 805 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 2048 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 105 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 256\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{8} a}}{4480 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 11.62, size = 199, normalized size = 1.41 \begin {gather*} -\frac {3\,x}{128\,a}-\frac {\frac {3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{15}}{64}+\frac {23\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{13}}{64}+4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{12}-\frac {333\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{11}}{64}+\frac {671\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9}{64}+4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8-\frac {671\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7}{64}+\frac {32\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6}{5}+\frac {333\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{64}-\frac {4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{5}-\frac {23\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{64}+\frac {32\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{35}-\frac {3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{64}+\frac {4}{35}}{a\,d\,{\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}^8} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________